Seal GtkHandleBox
authorTim Janik <timj@src.gnome.org>
Fri, 20 Jun 2008 11:07:56 +0000 (11:07 +0000)
committerTim Janik <timj@src.gnome.org>
Fri, 20 Jun 2008 11:07:56 +0000 (11:07 +0000)
svn path=/trunk/; revision=20601

gtk/gtk.symbols
gtk/gtkhandlebox.c
gtk/gtkhandlebox.h

index d53b0704f54bbf651066f96bd0cc06388bd67bfb..df3deaadf7841224e50dc7dfa8fe2b7a7c4aaa8a 100644 (file)
@@ -1584,6 +1584,7 @@ gtk_gc_release
 gtk_handle_box_get_handle_position
 gtk_handle_box_get_shadow_type
 gtk_handle_box_get_snap_edge
+gtk_handle_box_get_child_detached
 gtk_handle_box_get_type G_GNUC_CONST
 gtk_handle_box_new
 gtk_handle_box_set_handle_position
index 6036dfdc72e1d91a5eb97043b1a8382b4c55b7f5..d6435f4b02b8b823b1d8ca07fc37fed0be32c8fc 100644 (file)
@@ -50,7 +50,8 @@ enum {
   PROP_SHADOW_TYPE,
   PROP_HANDLE_POSITION,
   PROP_SNAP_EDGE,
-  PROP_SNAP_EDGE_SET
+  PROP_SNAP_EDGE_SET,
+  PROP_CHILD_DETACHED
 };
 
 #define DRAG_HANDLE_SIZE 10
@@ -205,6 +206,14 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
                                                         FALSE,
                                                         GTK_PARAM_READWRITE));
 
+  g_object_class_install_property (gobject_class,
+                                   PROP_CHILD_DETACHED,
+                                   g_param_spec_boolean ("child-detached",
+                                                        P_("Child Detached"),
+                                                        P_("A boolean value indicating whether the handlebox's child is attached or detached."),
+                                                        FALSE,
+                                                        GTK_PARAM_READABLE));
+
   object_class->destroy = gtk_handle_box_destroy;
 
   widget_class->map = gtk_handle_box_map;
@@ -323,6 +332,9 @@ gtk_handle_box_get_property (GObject         *object,
     case PROP_SNAP_EDGE_SET:
       g_value_set_boolean (value, handle_box->snap_edge != -1);
       break;
+    case PROP_CHILD_DETACHED:
+      g_value_set_boolean (value, handle_box->child_detached);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -850,6 +862,24 @@ gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box)
   return handle_box->snap_edge;
 }
 
+/**
+ * gtk_handle_box_get_child_detached:
+ * @handle_box: a #GtkHandleBox
+ *
+ * Whether the handlebox's child is currently detached.
+ *
+ * Return value: %TRUE if the child is currently detached, otherwise %FALSE
+ *
+ * Since:  GSEAL-branch
+ **/
+gboolean
+gtk_handle_box_get_child_detached (GtkHandleBox *handle_box)
+{
+  g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), FALSE);
+
+  return handle_box->child_detached;
+}
+
 static void
 gtk_handle_box_paint (GtkWidget      *widget,
                  
index 1d7367c40fb3f3e0c5aeea3a1c5e6e376a692ef7..9292466c762bc5930249646637a1e53e132e8426 100644 (file)
@@ -58,23 +58,23 @@ struct _GtkHandleBox
 {
   GtkBin bin;
 
-  GdkWindow      *bin_window;  /* parent window for children */
-  GdkWindow      *float_window;
-  GtkShadowType   shadow_type;
-  guint                  handle_position : 2;
-  guint                  float_window_mapped : 1;
-  guint                  child_detached : 1;
-  guint                  in_drag : 1;
-  guint                  shrink_on_detach : 1;
-
-  signed int      snap_edge : 3; /* -1 == unset */
+  GdkWindow      *GSEAL (bin_window);  /* parent window for children */
+  GdkWindow      *GSEAL (float_window);
+  GtkShadowType   GSEAL (shadow_type);
+  guint                  GSEAL (handle_position : 2);
+  guint                  GSEAL (float_window_mapped : 1);
+  guint                  GSEAL (child_detached : 1);
+  guint                  GSEAL (in_drag : 1);
+  guint                  GSEAL (shrink_on_detach : 1);
+
+  signed int      GSEAL (snap_edge : 3); /* -1 == unset */
   
   /* Variables used during a drag
    */
-  gint deskoff_x, deskoff_y; /* Offset between root relative coordinates
+  gint GSEAL (deskoff_x), GSEAL (deskoff_y); /* Offset between root relative coordinates
                              * and deskrelative coordinates */
-  GtkAllocation   attach_allocation;
-  GtkAllocation   float_allocation;
+  GtkAllocation   GSEAL (attach_allocation);
+  GtkAllocation   GSEAL (float_allocation);
 };
 
 struct _GtkHandleBoxClass
@@ -105,6 +105,7 @@ GtkPositionType gtk_handle_box_get_handle_position(GtkHandleBox    *handle_box);
 void          gtk_handle_box_set_snap_edge        (GtkHandleBox    *handle_box,
                                                   GtkPositionType  edge);
 GtkPositionType gtk_handle_box_get_snap_edge      (GtkHandleBox    *handle_box);
+gboolean      gtk_handle_box_get_child_detached   (GtkHandleBox    *handle_box);
 
 G_END_DECLS